import request from '@/utils/request'
//添加课程
export function addCourse(courseInfoVo) {
  return request({
    url: '/eduservice/course/addCourse',
    method: 'post',
    data:courseInfoVo
  })
}

//ID获取课程
export function getCourseId(id) {
  return request({
    url: `/eduservice/course/getCourseId?id=${id}`,
    method: 'get'
  })
}
//这个是获取
export function getCoursePublishV(id) {
  return request({
    url: `/eduservice/course/getCoursePublishV?id=${id}`,
    method: 'get'
  })
}

//修改课程
export function modifyCourseId(courseInfoVo) {
  return request({
    url: `/eduservice/course/modifyCourseId`,
    method: 'Put',
    data:courseInfoVo
  })
}

//上传课程
export function releaseCourse(id) {
  return request({
    url: `/eduservice/course/releaseCourse?id=${id}`,
    method: 'Put'
  })
}


//获取全部课程
export function getCourselist() {
  return request({
    url: `/eduservice/course/getCourselist`,
    method: 'get'
  })
}

//删除课程
export function delCourselist(id) {
  return request({
    url: `/eduservice/course/removeCourse?id=${id}`,
    method: 'Delete'
  })
}



//Chapter


export function getChapterVideoId(id) {
  return request({
    url: `/eduservice/chapter/getChapterVideoId?id=${id}`,
    method: 'get'
  })
}


export function addChapter(chapter) {
  return request({
    url: `/eduservice/chapter/addChapter`,
    method: 'post',
    data:chapter
  })
}


export function delChapter(id) {
  return request({
    url: `/eduservice/chapter/delChapter?id=${id}`,
    method: 'Delete'
  })
}

export function getChapterById(id) {
  return request({
    url: `/eduservice/chapter/getChapterById?id=${id}`,
    method: 'get'
  })
}

export function modifyChapter(chapter) {
  return request({
    url: `/eduservice/chapter/modifyChapter`,
    method: 'put',
    data:chapter
  })
}

//video
